package com.ii2d.grails.plugin.jqueryqtip

class JqueryQtipTagLib {
	
	static namespace = 'jqqtip'
	
	def pluginManager
	
	def resources = { attrs ->
		def plugin = pluginManager.getGrailsPlugin('jquery-qtip')
		def jqueryQtipVersion = plugin.instance.JQUERY_QTIP_VERSION
		def url = g.resource(plugin: 'jquery-qtip', dir:'js/jquery-qtip',
                                file:"jquery.qtip-${jqueryQtipVersion}.js")
		out << "<script src=\"${url.encodeAsHTML()}\" ></script>"
	}
}
